// in the majority of cases (wired, wwan)
},
+ _firmwareChanged: function() {
+ if (this._firmwareChangedId) {
+ GObject.Object.prototype.disconnect.call(this._device, this._firmwareChangedId);
+ this._firmwareChangedId = 0;
+ }
+ this._substateChanged();
+ },
+
getStatusLabel: function() {
if (!this._device)
return null;
// This state is actually a compound of various states (generically unavailable,
// firmware missing), that are exposed by different properties (whose state may
// or may not updated when we receive state-changed).
- if (!this._firmwareChangedId)
- this._firmwareChangedId = this._device.connect('notify::firmware-missing', Lang.bind(this, this._substateChanged));
if (this._device.firmware_missing) {
+ if (!this._firmwareChangedId)
+ this._firmwareChangedId = this._device.connect('notify::firmware-missing', Lang.bind(this, this._firmwareChanged));
+
/* Translators: this is for devices that require some kind of firmware or kernel
module, which is missing */
return _("firmware missing");
},
_updateStatusItem: function() {
- if (this._firmwareChangedId) {
- GObject.Object.prototype.disconnect.call(this._device, this._firmwareChangedId);
- this._firmwareChangedId = 0;
- }
-
this.statusItem.setStatus(this.getStatusLabel());
this.statusItem.setToggleState(this.connected);
},